MySQL: Learn By Coding by Scott Hughes

MySQL: Learn By Coding by Scott Hughes

Author:Scott Hughes
Language: eng
Format: azw3
Published: 2017-08-20T07:00:00+00:00


SELECT * FROM purchases WHERE date='2017-02-27' ORDER BY price DESC;

The "DESC" part tells MySQL that you want the results in descending order. They should look like this:

+----+------------+-------+--------------+

| id | date | price | description |

+----+------------+-------+--------------+

| 47 | 2017-02-27 | 25.49 | Dog Medicine |

| 46 | 2017-02-27 | 11.00 | Medicine |

| 45 | 2017-02-27 | 8.40 | Vet Bill |

+----+------------+-------+--------------+

3 rows in set (0.00 sec)

You'll notice that the results are now descending from high to low.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.